package cn.tedu.boot331.mapper;

import cn.tedu.boot331.vo.Item;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ItemMapper {
    @Insert("insert into item values(null,#{name},#{num},#{p   rice},#{intro})")
    void insert(Item item);

    @Select("select * from item")
    List<Item> select();

    @Delete("delete from item where id=#{id}")
    void delete(int id);

    @Update("update item set name=#{name},num=#{num},price=#{price},intro=#{intro} where id=#{id}")
    void update(Item item);
}
